import { useState } from 'react'
function App() {
    const [value, setValue] = useState('hello world')
    function onChange(e) {
        setValue(e.target.value)
        console.log(e.target.value);
    }
    return (
        // value = { value }指明input框内的值手动输入无效
        <input type="text" value={value} onChange={onChange} />
    )
}
export default App